/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei UI', 'Arial', sans-serif;
}

:root {
    --primary: #00f0ff;
    --secondary: #bd00ff;
    --success: #00ffa3;
    --warning: #ffcc00;
    --danger: #ff4d6d;
    --dark-bg: #0a0e17;
    --card-bg: rgba(16, 22, 36, 0.7);
    --text-primary: #e0f7ff;
    --text-secondary: #a0b0c0;
    --grid-color: rgba(0, 217, 255, 0.1);
    --timeline-color: rgba(0, 240, 255, 0.3);
}

body {
    background-color: var(--dark-bg);
    background-image:
            radial-gradient(circle at center, rgba(0, 216, 255, 0.05) 0%, transparent 80%),
            linear-gradient(to bottom, transparent, var(--dark-bg));
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

#app {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* 头部导航样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.3);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
    opacity: 0;
}

.logo-icon::after {
    content: "";
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 4L2.99 5.27l3.58 3.58C6.04 9.24 5.5 10.09 5.5 11.5c0 1.38.56 2.63 1.46 3.54L4 17h12.73l2 2L21 19.73 4.27 3 4.27 4zM3.5 9a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1z"/></svg>');
    background-size: contain;
    position: relative;
    z-index: 2;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-item {
    position: relative;
    padding: 10px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item.active, .nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active::after, .nav-item:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

/* 卡片样式 */
.dashboard {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    padding: 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 216, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.5);
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
    var(--primary),
    transparent,
    var(--secondary));
    z-index: -1;
    border-radius: 17px;
    animation: borderAnimation 3s infinite linear;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

/* 图表容器 */
.chart-container {
    height: 300px;
    width: 100%;
}

/* 网格背景 */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
            linear-gradient(var(--grid-color) 1px, transparent 1px),
            linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

/* 数据流动画 */
.data-flow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.3;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.7;
    animation: float linear infinite;
}

/* 动画定义 */
@keyframes borderAnimation {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes float {
    to {
        transform: translateY(-100vh);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes timeline {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 响应式布局 */
.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-8 { grid-column: span 8; }

@media (max-width: 1200px) {
    .col-3, .col-4 { grid-column: span 6; }
    .col-6, .col-8 { grid-column: span 12; }
}

@media (max-width: 768px) {
    .col-3, .col-4, .col-6, .col-8 { grid-column: span 12; }
    .nav-menu { gap: 15px; }
    .header { flex-direction: column; gap: 20px; }
}

/* 趋势分析页特定样式 */
.time-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 0;
}

.time-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 4px;
    flex-wrap: wrap;
}

.tab-item {
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tab-item.active {
    background: rgba(0, 240, 255, 0.2);
    color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.date-range {
    display: flex;
    gap: 10px;
}

.trend-summary {
    display: flex;
    justify-content: space-around;
    padding: 15px 0 5px;
    border-top: 1px solid rgba(0, 217, 255, 0.2);
    margin-top: 15px;
}

.trend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trend-item .label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.trend-item .value {
    font-size: 18px;
    font-weight: 600;
}

.trend-item .value.up {
    color: var(--success);
}

.trend-item .value.down {
    color: var(--danger);
}

.industry-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.legend-toggle {
    font-size: 14px;
    color: var(--primary);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(0, 240, 255, 0.1);
    transition: all 0.3s ease;
}

.legend-toggle:hover {
    background: rgba(0, 240, 255, 0.2);
}

.forecast-container {
    display: flex;
    gap: 20px;
    height: 350px;
}

.forecast-container .chart-container {
    flex: 3;
    height: 100%;
}

.forecast-summary {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.forecast-summary h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.forecast-summary p {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.confidence {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    z-index: 1;
    animation: timeline 15s linear infinite;
}

.time-wave {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%2300f0ff"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%2300f0ff"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%2300f0ff"/></svg>');
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
}